<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Classes')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="form-inline" data-toggle="cxselect" data-selects="school,grade,classes,parents">
                <select class="form-control school" name="row[school_id]" data-url="school/cxSelect"></select>
                <select class="form-control grade" name="row[grade_id]" data-url="grade/cxSelect" data-query-name="school_id"></select>
                <select class="form-control classes" name="row[class_id]" data-url="classes/cxSelect?type=1" data-query-name="grade_id"></select>
            </div>
        </div>
    </div>

    <div class="form-group">
        <label for="c-number" class="control-label col-xs-12 col-sm-2">{:__('Number')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-number" class="form-control" name="row[number]" type="text" value="" data-rule="required">
        </div>
    </div>

    <div class="form-group">
        <label for="c-edu_id_number" class="control-label col-xs-12 col-sm-2">{:__('Edu Id Number')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-edu_id_number" class="form-control" name="row[edu_id_number]" type="text" value="" data-rule="required">
        </div>
    </div>

    <div class="form-group">
        <label for="c-card_number" class="control-label col-xs-12 col-sm-2">{:__('Card Number')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-card_number" class="form-control" name="row[card_number]" type="text" value="" data-rule="required">
        </div>
    </div>

    <div class="form-group">
        <label for="c-avatar" class="control-label col-xs-12 col-sm-2">{:__('Avatar')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input type="text" id="c-avatar" name="row[avatar]" class="form-control" readonly/>
        </div>
    </div>
    <div class="form-group">
        <label for="c-local" class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button id="plupload-avatar" class="btn btn-primary plupload" data-input-id="c-avatar" data-url="{:url('ajax/upload')}"><i class="fa fa-upload"></i> {:__("上传")}</button>
        </div>
    </div>

    <div class="form-group">
        <label for="c-name" class="control-label col-xs-12 col-sm-2">{:__('Name')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-name" class="form-control" name="row[name]" type="text" value="" data-rule="required">
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Gender')}:</label>
        <div class="col-xs-12 col-sm-8">
            {:build_select('row[gender]', $genderData, null, ['class'=>'form-control selectpicker', 'data-rule'=>'required'])}
        </div>
    </div>

    <div class="form-group">
        <label for="c-birthday" class="control-label col-xs-12 col-sm-2">{:__('Birthday')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class='input-group datetimepicker' style="width: 50%">
                <input type='text' class="form-control" id="c-birthday" name="row[birthday]"/>
                <span class="input-group-addon"><span class="glyphicon glyphicon-calendar"></span></span>
            </div>
        </div>
    </div>

    <div class="form-group">
        <label for="c-enrollment_type" class="control-label col-xs-12 col-sm-2">{:__('Enrollment Type')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-enrollment_type" class="form-control" name="row[enrollment_type]" type="text" value="" data-rule="required">
        </div>
    </div>

    <div class="form-group">
        <label for="c-enrollment_year" class="control-label col-xs-12 col-sm-2">{:__('Enrollment Year')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-enrollment_year" class="form-control" name="row[enrollment_year]" type="text" value="" data-rule="required">
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Status')}:</label>
        <div class="col-xs-12 col-sm-8">
            {:build_radios('row[status]', ['1'=>__('是'), '0'=>__('否')])}
        </div>
    </div>

    <!--<div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Parents')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="form-inline" data-toggle="cxselect" data-selects="parents">
                <select class="form-control parents" name="row[parents_id]" data-url="parents/cxSelect" data-query-name="school_id"></select>
            </div>
        </div>
    </div>-->

    <div class="form-group">
        <label for="c-parents_name" class="control-label col-xs-12 col-sm-2">{:__('Parents Name')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-parents_name" class="form-control" name="parents_name" type="text" value="" data-rule="required">
        </div>
    </div>

    <div class="form-group">
        <label for="c-parents_mobile" class="control-label col-xs-12 col-sm-2">{:__('Parents Mobile')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-parents_mobile" class="form-control" name="parents_mobile" type="text" value="" data-rule="required">
        </div>
    </div>

    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>



<!--<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">-->
<!--    <div class="form-group">-->
<!--        <label for="c-number" class="control-label col-xs-12 col-sm-2">{:__('学校')}:</label>-->
<!--        <div class="col-xs-12 col-sm-8">-->
<!--            <input id="c-school" data-rule="required" data-source="school/selectpage" class="form-control selectpage" name="row[school_id]" type="text" value="">-->
<!--        </div>-->
<!--    </div>-->
<!--    <div id="tpl_div">-->
<!--    </div>-->
<!--    <div class="form-group layer-footer">-->
<!--        <label class="control-label col-xs-12 col-sm-2"></label>-->
<!--        <div class="col-xs-12 col-sm-8">-->
<!--            <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>-->
<!--            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>-->
<!--        </div>-->
<!--    </div>-->
<!--</form>-->

<script id="tpl" type="text/html">
    <div class="form-group">
        <label for="c-grade" class="control-label col-xs-12 col-sm-2">{:__('年级')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-grade" data-rule="required"  class="form-control" name="row[grade_id]" type="text" value="">
        </div>
    </div>
    <div class="form-group">
        <label for="c-classes" class="control-label col-xs-12 col-sm-2">{:__('班级')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-classes" data-rule="required" class="form-control" name="row[classes_id]" type="text" value="">
        </div>
    </div>
</script>

